<?php
namespace core\tv\validate;

use core\Validate;

class AdverValidate extends Validate
{

    /**
     * 规则
     *
     * @var unknown
     */
    protected $rule = [
        'adver_name' => 'require',
        'position' => 'require',
        'src' => 'require',
        'link' => 'require'
    ];

    /**
     * 提示
     *
     * @var unknown
     */
    protected $message = [
        'adver_name.require' => '广告名称为空',
        'position.require' => '广告位置为空',
        'src.require' => '广告图片地址为空',
        'link.require' => '广告链接地址为空'
    ];

    /**
     * 场景
     *
     * @var unknown
     */
    protected $scene = [
        'add' => [
            'adver_name',
            'position',
            'src',
            'link'
        ],
        'edit' => [
            'adver_name',
            'position',
            'src',
            'link'
        ]
    ];
}